<?php
/*
 *  FireFly theme
 *  Archive template
 *  (c) 2011, chugylo
 */
?>
<?php get_header(); ?>
        <div id="content">
            <div id="posts-desc">
                <?php if (is_day()) : ?>
                <?php printf(__('These are posts written on the <span>%s</span>', 'firefly'), get_the_date()); ?>
                <?php elseif (is_month()) : ?>
                <?php printf(_x('These are posts written in the <span>%s</span>', 'month', 'firefly'), get_the_date('F Y')); ?>
                <?php elseif ( is_year() ) : ?>
                <?php printf(_x('These are posts written in the <span>%s</span>', 'year', 'firefly'), get_the_date('Y')); ?>
                <?php endif; ?></div>
            <?php if (have_posts()) :
                while (have_posts()) :
                    the_post(); ?>
            <div class="post">
                <div class="post-title">
                    <h2><a href="<?php the_permalink(); ?>" title="<?php printf(__('Permanent link to post %s', 'firefly'), get_the_title()); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                </div>
                <div class="post-header">
                    <span class="post-date"><?php the_time('d') ?>-<a href="<?= site_url(); ?>/<?php the_time('Y') ?>/<?php the_time('m') ?>/" title="<?php _e('Archive for', 'firefly'); ?> <?php the_time('F Y') ?>" class="post-month"><?php the_time('m') ?></a>-<a href="<?= site_url(); ?>/<?php the_time('Y') ?>/" title="<?php _e('Archive for', 'firefly'); ?> <?php the_time('Y') ?>" class="post-year"><?php the_time('Y') ?></a>  <?php the_time('H:i') ?></span>
                    <?php if (show_author()) : ?>
                    &#183;
                    <span class="post-author"><?php the_author_posts_link(); ?></span>
                    <?php endif; ?>
                    &#183;
                    <span class="post-comments-number"><a href="<?php the_permalink(); ?>#comments" class="comment-link"><?php firefly_comments_number(); ?></a></span>
                </div>
                <?php
                    the_content(__('More &gt;&gt;', 'firefly')); ?>
                <div class="post-categories">
                    <?php firefly_categories(get_the_category()); ?>
                </div>
                <div class="post-tags">
                    <?php firefly_tags(get_the_tags()); ?>
                </div>
            </div><!--end post--><?php
                endwhile;
            endif; ?>
    </div><?php
        if (function_exists('wp_pagenavi')) : ?>
        <div id="pager">
            <?php wp_pagenavi(); ?>
        </div><?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
